﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DecoratorPattern.DecoratorClass;

/// <summary>
/// 装饰器模式的基类 使用组合+基础类的方式来实现装饰器模式
/// </summary>
public class BaseDecorator : AbstructStudent
{
    private readonly AbstructStudent _abstructStudent;

    public BaseDecorator(AbstructStudent abstructStudent)
    {
        _abstructStudent = abstructStudent;
    }
    public override void Study()
    {
        //Console.WriteLine("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
        _abstructStudent.Study();
        //Console.WriteLine("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
    }
}
